//
//  ContentCell.m
//  ZhiHuiLiJiang
//
//  Created by Work on 2018/11/20.
//  Copyright © 2018年 WisdomLijiang. All rights reserved.
//已废弃

#import "ContentCell.h"

@implementation ContentCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self addView];
    }
    return self;
}

-(void)addView{
    [self.contentView addSubview:self.HimageView];
    [self.contentView addSubview:self.titleLabel];
    [self.contentView addSubview:self.contentLabel];
    [self.contentView addSubview:self.conteryLabel];
    [self.contentView addSubview:self.numLabel];
    [self.contentView addSubview:self.timeLabel];
    [self.HimageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).offset(12);
        make.size.mas_equalTo(CGSizeMake(124, 82));
        make.left.equalTo(self.contentView.mas_left).offset(10);

        
    }];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).offset(14);
        make.left.equalTo(self.HimageView.mas_right).offset(16);
        make.right.equalTo(self.contentView.mas_right).offset(-10);
        
    }];
    

    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.titleLabel.mas_bottom).offset(14);
        make.left.equalTo(self.HimageView.mas_right).offset(16);
        make.right.equalTo(self.contentView.mas_right).offset(-10);
        
    }];
    
    [self.conteryLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentLabel.mas_bottom).offset(10);
        make.left.equalTo(self.contentLabel.mas_left);
        
    }];  [self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentLabel.mas_bottom).offset(10);
        make.left.equalTo(self.conteryLabel.mas_right).offset(10);
        
    }];  [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentLabel.mas_bottom).offset(10);
        make.left.equalTo(self.numLabel.mas_right).offset(10);
    }];
}
-(UILabel *)contentLabel{
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc]init];
        _titleLabel.textColor =  RGBA(0, 0, 0, 0.8);
        _contentLabel.font = H14;
        _contentLabel.numberOfLines = 2;
        [_contentLabel sizeToFit];
    }
    return _contentLabel;
}
-(UILabel *)conteryLabel{
    if (!_conteryLabel) {
        _conteryLabel = [[UILabel alloc]init];
        _conteryLabel.textColor =  RGBA(0, 0, 0, 0.6);
        _conteryLabel.font = H12;
        [_conteryLabel sizeToFit];
        
    }
    return _conteryLabel;
}

-(UILabel *)numLabel{
    if (!_numLabel) {
        _numLabel = [[UILabel alloc]init];
        _numLabel.textColor =  RGBA(0, 0, 0, 0.6);
        _numLabel.font = H12;
        [_numLabel sizeToFit];
        
    }
    return _numLabel;
}
-(UILabel *)timeLabel{
    if (!_timeLabel) {
        _timeLabel = [[UILabel alloc]init];
        _timeLabel.textColor =  RGBA(0, 0, 0, 0.6);
        _timeLabel.font = H12;
        [_timeLabel sizeToFit];
        
    }
    return _timeLabel;
}
-(UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.textColor =  RGBA(0, 0, 0, 0.8);
        _titleLabel.font = HB17;
        [_titleLabel sizeToFit];
        
    }
    return _titleLabel;
}

-(UIImageView *)HimageView{
    if (!_HimageView) {
        _HimageView  = [[UIImageView alloc]init];
    }
    return _HimageView;
}

@end
